<ion-view view-title="分销查询">
  <div class="bar bar-subheader" style="padding: 0;">
    <div class="item-input-inset crm-item-search">
      <label class="item-input item-input-wrapper ink">
        <i class="icon ion-search placeholder-icon"></i>
        <input type="text" placeholder="输入酒店名称、ID、地址" ng-model="distributionOrder.search.value" ng-change="distributionOrder.search.doAct()">
      </label>
    </div>
  </div>
  <ion-content class="crm-content has-tabs-top">
    <ion-refresher
            pulling-text="下拉刷新"
            on-refresh="distributionOrder.refresh()">
    </ion-refresher>
    <ul class="list">
      <li class="item" ng-repeat="distr in distributionOrder.data track by $index" ng-click="goDetailMain(distr)">
        <div class="row">
          <div class="col-67">
            <h2>{{distr.hotelName}}</h2>
            <p>{{distr.channelName}}</p>
            <p>{{distr.createTime |  date:'yyyy-MM-dd HH:mm'}}</p>
          </div>
          <div class="col-33 text-right">
            <p>{{distr.orderStatus}}</p>
            <p class="crm-color">￥{{distr.totalPrice| currency:""}}</p>
            <p>{{distr.payType}}</p>
          </div>
        </div>
      </li>
      <li class='item text-center' ng-if="distributionOrder.loaded && distributionOrder.data.length==0">
        <p>您负责的酒店还没有分销订单</p>
      </li>
    </ul>
    <ion-infinite-scroll
            ng-if="distributionOrder.moreDataCanBeLoaded"
            on-infinite="distributionOrder.loadMore()"
            distance="5%"
            spinner="dots">
    </ion-infinite-scroll>
  </ion-content>
</ion-view>